<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03data</title>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="div1">
    <p>{{users[0].id}}</p>
    <p>{{users[0].name}}</p>
    <p>{{u.id}}==={{u.sex}}</p>
    <div>{{name}}-----{{age}}</div>
</div>
<script>
    //data,接收一个函数时，必须有返回值
    var vm=new Vue({
        el:"#div1",
        data:function(){
            return{
                "users":[{"id":1,"name":"zs"},
                    {"id":2,"name":"ls"}
                ],
                u:{"id":3,"sex":"男"},
                name:"dw",
                age:18
            }
        }
    })
</script>
</body>
<html>